package com.weixinli.beans;

import java.io.Serializable;

public class FmMusic implements Serializable{
	private int mid;//音乐ID
	private String mname;//音乐名字
	private String maddr;//音乐地址
	private String mtype;//音乐类型
	private String mtime;//收录时间
	private String mauthor;//作者
	private int mnumber;//播放次数
	private int mdownload;//下载次数
	private String mAudio;  //音频地址
	private static final long serialVersionUID = 1L;
	@Override
	public String toString() {
		return "FmMusic [mid=" + mid + ", mname=" + mname + ", maddr=" + maddr
				+ ", mtype=" + mtype + ", mtime=" + mtime + ", mauthor="
				+ mauthor + ", mnumber=" + mnumber + ", mdownload=" + mdownload
				+ ", mAudio=" + mAudio + "]";
	}
	public int getMid() {
		return mid;
	}
	public void setMid(int mid) {
		this.mid = mid;
	}
	public String getMname() {
		return mname;
	}
	public void setMname(String mname) {
		this.mname = mname;
	}
	public String getMaddr() {
		return maddr;
	}
	public void setMaddr(String maddr) {
		this.maddr = maddr;
	}
	public String getMtype() {
		return mtype;
	}
	public void setMtype(String mtype) {
		this.mtype = mtype;
	}
	public String getMtime() {
		if(mtime!=null && !"".equals(mtime) && mtime.indexOf(" ")>0){
			return mtime.substring(0,mtime.indexOf(" "));
		}else{
			return mtime;
		}
	}
	public void setMtime(String mtime) {
		this.mtime = mtime;
	}
	public String getMauthor() {
		return mauthor;
	}
	public void setMauthor(String mauthor) {
		this.mauthor = mauthor;
	}
	public int getMnumber() {
		return mnumber;
	}
	public void setMnumber(int mnumber) {
		this.mnumber = mnumber;
	}
	public int getMdownload() {
		return mdownload;
	}
	public void setMdownload(int mdownload) {
		this.mdownload = mdownload;
	}
	public String getmAudio() {
		return mAudio;
	}
	public void setmAudio(String mAudio) {
		this.mAudio = mAudio;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((mAudio == null) ? 0 : mAudio.hashCode());
		result = prime * result + ((maddr == null) ? 0 : maddr.hashCode());
		result = prime * result + ((mauthor == null) ? 0 : mauthor.hashCode());
		result = prime * result + mdownload;
		result = prime * result + mid;
		result = prime * result + ((mname == null) ? 0 : mname.hashCode());
		result = prime * result + mnumber;
		result = prime * result + ((mtime == null) ? 0 : mtime.hashCode());
		result = prime * result + ((mtype == null) ? 0 : mtype.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		FmMusic other = (FmMusic) obj;
		if (mAudio == null) {
			if (other.mAudio != null)
				return false;
		} else if (!mAudio.equals(other.mAudio))
			return false;
		if (maddr == null) {
			if (other.maddr != null)
				return false;
		} else if (!maddr.equals(other.maddr))
			return false;
		if (mauthor == null) {
			if (other.mauthor != null)
				return false;
		} else if (!mauthor.equals(other.mauthor))
			return false;
		if (mdownload != other.mdownload)
			return false;
		if (mid != other.mid)
			return false;
		if (mname == null) {
			if (other.mname != null)
				return false;
		} else if (!mname.equals(other.mname))
			return false;
		if (mnumber != other.mnumber)
			return false;
		if (mtime == null) {
			if (other.mtime != null)
				return false;
		} else if (!mtime.equals(other.mtime))
			return false;
		if (mtype == null) {
			if (other.mtype != null)
				return false;
		} else if (!mtype.equals(other.mtype))
			return false;
		return true;
	}
	public FmMusic(int mid, String mname, String maddr, String mtype,
			String mtime, String mauthor, int mnumber, int mdownload,
			String mAudio) {
		super();
		this.mid = mid;
		this.mname = mname;
		this.maddr = maddr;
		this.mtype = mtype;
		this.mtime = mtime;
		this.mauthor = mauthor;
		this.mnumber = mnumber;
		this.mdownload = mdownload;
		this.mAudio = mAudio;
	}
	public FmMusic() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	
}
